﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Collections.Specialized;
using System.Collections.ObjectModel;

namespace Locator.Silverlight.Client
{
    public partial class ManageStores : ChildWindow
    {
        public ManageStores()
        {
            InitializeComponent();
            //DrinkLocatorMvvm.ViewModel.ViewModelLocator.ManagePersonalLocationsStatic.UserLocations.CollectionChanged += new NotifyCollectionChangedEventHandler(UserLocations_CollectionChanged);
            //this.ListBoxPersonalLocations.SelectionChanged += new SelectionChangedEventHandler(ListBoxPersonalLocations_SelectionChanged);
        }

        //void ListBoxPersonalLocations_SelectionChanged(object sender, SelectionChangedEventArgs e)
        //{
        //    int i = this.ListBoxPersonalLocations.SelectedIndex; ;
        //}

        //void ListBoxPersonalLocations_LayoutUpdated(object sender, EventArgs e)
        //{
        //    int i = this.ListBoxPersonalLocations.SelectedIndex; ;
        //}

        //void UserLocations_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        //{
        //    ObservableCollection<PersonalLocationViewModel> locations = sender as ObservableCollection<PersonalLocationViewModel>;
        //    if (this.ListBoxPersonalLocations.Items.Count == 1)
        //    {
        //        this.ListBoxPersonalLocations.SelectedIndex = 0;
        //    }
        //}

        //private void OKButton_Click(object sender, RoutedEventArgs e)
        //{
        //    this.DialogResult = true;
        //}

        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }
    }
}

